package com.jeomo.masterdata.starter.mapper;

import com.jeomo.base.starter.mapper.IBaseMapper;
import com.jeomo.masterdata.starter.entity.Merchant;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 崔贺
 */
@Mapper
public interface MerchantMapper extends IBaseMapper<Merchant> {

    @Select("SELECT `code` FROM master_merchant WHERE org_code = #{orgCode} order by `code` DESC LIMIT 1 ")
    String queryRecentlyCode(String orgCode);

    /**
     * @param tobCode
     * @description: 根据tobCodes查询商户
     * @return: java.util.List<com.jeomo.masterdata.starter.entity.Merchant>
     * @author: 崔贺
     * @time: 2020/11/6 14:25
     */
    List<Merchant> selectMerchantByTobCode(String tobCode, String orgCode);

}
